/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Utils;

import java.text.DecimalFormat;

/**
 *
 * @author borysfan
 */
public class FormatUtils {

    public static String getStringWithPrecision(double value, int n) {
        DecimalFormat df = new DecimalFormat();
        df.setMaximumFractionDigits(n);
        df.setMinimumFractionDigits(n);
        return df.format(value);
    }
}
